package com.ibeeking.found.common.enums;
/**
 *  @ClassName OpenApiConfigEnum
 * @Author ibeeking
 * @Date 2021/7/5 10:46
 * @Version 1.0
 * @Description 开放平台类型定义
 */
public enum WxOpenAppTypeEnum {
    WECHAT_OPEN_APP_TYPE_TP(1,"微信开放平台_三方应用"),
    WECHAT_OPEN_APP_TYPE_APP(2,"微信开放平台_移动应用"),
    WECHAT_OPEN_APP_TYPE_WEB(3,"微信开放平台_网站应用"),
    WECHAT_OPEN_APP_TYPE_MP(4,"微信开放平台_公众号"),
    WECHAT_OPEN_APP_TYPE_MA(5,"微信开放平台_小程序"),
    WECHAT_OPEN_APP_TYPE_VIDEO(6,"微信开放平台_视频号"),
    ;

    private Integer code;
    private String value;

    WxOpenAppTypeEnum(Integer code, String value) {
        this.code = code;
        this.value = value;
    }

    public Integer getCode() {
        return code;
    }

    public String getValue() {
        return value;
    }

    public static String getValueByCode(Integer code) {
        for (WxOpenAppTypeEnum enumObj : values()) {
            if (enumObj.getCode().equals(code)) {
                return enumObj.getValue();
            }
        }
        return null;
    }
}
